<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
      .gold {
          color: gold;
      }

      .font {
          font-size: 18px;
      }

      .bgc {
          background-color: aqua;
      }
  </style>
</head>
<body>
  <div id="app">
      <h1 class="gold font">v-bind</h1>
      <hr>
      <h1 :class="{'gold':flag,'font':!flag}" @click='changeStyle'> v-bind object font change</h1>
      <hr>
      <h1 :class="['gold','font','bgc']">v-bind array </h1>
      <hr>
      <h1 :class="['gold',{'font':!flag, 'bgc':flag}]" @click='changeStyle'>v-bind array and object</h1>
  </div>
  <script src="./vue.js"></script>
  <script>
    var vm = new Vue({
      el:'#app',
      data:{
          flag: true
      },
      methods:{
          changeStyle() {
              this.flag = !this.flag
          }
      }
     });
  </script>
</body>
</html>
